<template>
  <div class="card h-100">
    <div class="card-header pb-0 p-3">
      <div class="row">
        <div class="col-6 d-flex align-items-center">
          <h6 class="mb-0">可租用设备</h6>
        </div>
      </div>
    </div>
    <div class="card-body p-3 pb-0 mb-0">
      <ul class="list-group">
        <li
          class="list-group-item border-0 d-flex justify-content-between ps-0 mb-2 border-radius-lg"
          v-for="(item, index) in form"
          :key="index"
        >
          <div class="d-flex flex-column">
            <h6 class="mb-1 text-dark font-weight-bold text-sm">
              {{ item.name }}
            </h6>
            <span class="text-xs">{{ item.number }}</span>
          </div>
          <div class="d-flex align-items-center text-sm">{{ item.price }}</div>
          <vsud-button color="success" size="sm" variant="outline" @click="rent"
            >租用</vsud-button
          >
        </li>
        <li
          class="list-group-item border-0 d-flex justify-content-between ps-0 mb-2 border-radius-lg"
        >
          <el-pagination layout="prev, pager, next" :total="50" />
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import VsudButton from "@/components/VsudButton.vue";
import { ElMessageBox } from "element-plus";
// import { Action } from 'element-plus'
export default {
  name: "RentCard",
  components: {
    VsudButton,
  },
  data() {
    return {
      form: [
        {
          name: "高级智能机床",
          number: "型号：#RV-126749",
          price: "$560",
        },
        {
          name: "中级智能机床",
          number: "型号：#RV-126749",
          price: "$250",
        },
        {
          name: "小型零件车床",
          number: "型号：#FB-21256",
          price: "$180",
        },
        {
          name: "航天专用车床",
          number: "型号：#QW-103578",
          price: "$120",
        },
        {
          name: "饮料加工车床",
          number: "型号：#AR-803481",
          price: "$300",
        },
        {
          name: "普通零件专用车床",
          number: "型号：#QW-103578",
          price: "$120",
        },
        {
          name: "零食加工车床",
          number: "型号：#AR-803481",
          price: "$300",
        },
      ],
    };
  },
  methods: {
    rent() {
      ElMessageBox.alert("租用成功！", "Title", {
        confirmButtonText: "OK",
      });
    },
  },
};
</script>
